package hd.cls6;

import java.io.*;

/**
 * @author oldliu
 * @since 1.0
 */
public class BufTest {
    public static void main(String[] args) {
        //try (BufferedReader br = new BufferedReader(new FileReader("f:/file.txt"))) {
//        try (BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream("f:/file.txt"),
//        "gbk"))) {
//            //读一行  \n
//            String str = null;
//            while ((str = br.readLine()) != null) {
//                System.out.println(str);
//            }
//        } catch (Exception e) {
//            e.printStackTrace();
//        }

        try (BufferedWriter bw = new BufferedWriter(new FileWriter("f/22.txt"))) {
            for (int i = 1; i <= 26; i++) {
                bw.write("你好，我司渣渣灰");
                bw.newLine();
            }
            bw.flush();///????刷新
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
